import type { AppRouteModule } from '@/router/types';
import { RoleEnum } from '@/enums/roleEnum';

import { LAYOUT } from '@/router/constant';

const account: AppRouteModule = {
  path: 'account',
  name: 'Account',
  component: LAYOUT,
  redirect: '/account/center',
  meta: {
    title: '个人中心',
    orderNo: 5,
    icon: 'ion:layers-outline',
  },
  children: [
    {
      path: 'center',
      name: 'AccountCenter',
      component: () => import('@/views/account/center/index.vue'),
      meta: {
        title: '个人收藏',
        roles: [RoleEnum.USER],
      },
    },
    {
      path: 'setting',
      name: 'AccountSetting',
      component: () => import('@/views/account/setting/index.vue'),
      meta: {
        title: '个人信息',
      },
    },
  ],
};

export default account;
